package org.chench.test.hiserviceclient.controller;

import org.chench.test.hiserviceclient.service.HiClientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HiClientController {

    @Autowired
    HiClientService hiClientService;

    @GetMapping("/hi")
    public String hi(@RequestParam("name") String name) {
        return hiClientService.sayHi(name);
    }
}
